import java.util.Arrays;

public class Main {
    public enum AAA {
        X, Y, Z;
    }
    public enum BBB {
        小鸡,
        小鸭,
        小朋友,
    }
    public enum Cars {
        BMW(30),
        AUDI(25),
        MERCEDES(40);
        
        // 枚举的每个对象都可以有属性、方法等
        int price;
        Cars(int price) {
            this.price = price;
        }
    }

    public static void main(String[] args) {
        System.out.println(AAA.X);
        System.out.println(AAA.Y);
        
        BBB b = BBB.valueOf("小鸭");
        System.out.println(b + " -> class: " + b.getClass());
        System.out.println(BBB.小朋友 + " 的位置索引： " + BBB.小朋友.ordinal());
        System.out.println(Arrays.toString(BBB.values()));

        System.out.println(Cars.BMW + "的价格是：" + Cars.BMW.price + "w");
    }
}